<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery/jquery-3.6.0.js"></script>
</head>
<body>
    <p id="test1">这是段落。</p>
    <p id="test2">这是另一个段落。</p>
    <p>Input field: <input type="text" id="test3" value="Mickey Mouse"></p>
    <button id="btn1">设置文本</button>
    <button id="btn2">设置 HTML</button>
    <button id="btn3">设置值</button>
    <script>
        $(document).ready(function(){
            $("#btn1").click(function(){
                $("#test1").text("hello world");
            });
            $('#btn2').click(function(){
                $("#test2").html("<i>hello world</i>");
            });
            $('#btn3').click(function(){
                $("#test3").val("Dolly Duck");
            });
        });


    </script>
</body>
</html>